package com.jiangxiaofei.citycloud.adapter;

import android.support.annotation.LayoutRes;
import android.support.annotation.Nullable;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.jiangxiaofei.citycloud.R;
import com.jiangxiaofei.citycloud.bean.HomeMenuBean;

import java.util.List;

/**
 * 作者: JiangXfei
 * 日期: 2017/10/19 0019
 * 主页菜单适配器
 */

public class HomeMenuAdapter extends BaseQuickAdapter<HomeMenuBean,BaseViewHolder> {
    public HomeMenuAdapter(@LayoutRes int layoutResId, @Nullable List<HomeMenuBean> data) {
        super(layoutResId, data);
    }
    @Override
    protected void convert(BaseViewHolder helper, HomeMenuBean item) {
//        helper.setText(R.id.text, item.getTitle());
        helper.setImageResource(R.id.icon, item.getImgRes());
    }
}
